package com.ruoyi.purchase.service.impl;

import java.util.List;

import com.ruoyi.purchase.mapper.FirmSupplierMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.domain.FirmSupplier;
import com.ruoyi.purchase.service.IFirmSupplierService;

/**
 * 供应商Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-16
 */
@Service
public class FirmSupplierServiceImpl implements IFirmSupplierService 
{
    @Autowired
    private FirmSupplierMapper firmSupplierMapper;

    /**
     * 查询供应商
     * 
     * @param id 供应商主键
     * @return 供应商
     */
    @Override
    public FirmSupplier selectFirmSupplierById(Long id)
    {
        return firmSupplierMapper.selectFirmSupplierById(id);
    }

    /**
     * 查询供应商列表
     * 
     * @param firmSupplier 供应商
     * @return 供应商
     */
    @Override
    public List<FirmSupplier> selectFirmSupplierList(FirmSupplier firmSupplier)
    {
        return firmSupplierMapper.selectFirmSupplierList(firmSupplier);
    }

    /**
     * 新增供应商
     * 
     * @param firmSupplier 供应商
     * @return 结果
     */
    @Override
    public int insertFirmSupplier(FirmSupplier firmSupplier)
    {
        return firmSupplierMapper.insertFirmSupplier(firmSupplier);
    }

    /**
     * 修改供应商
     * 
     * @param firmSupplier 供应商
     * @return 结果
     */
    @Override
    public int updateFirmSupplier(FirmSupplier firmSupplier)
    {
        return firmSupplierMapper.updateFirmSupplier(firmSupplier);
    }

    /**
     * 批量删除供应商
     * 
     * @param ids 需要删除的供应商主键
     * @return 结果
     */
    @Override
    public int deleteFirmSupplierByIds(Long[] ids)
    {
        return firmSupplierMapper.deleteFirmSupplierByIds(ids);
    }

    /**
     * 删除供应商信息
     * 
     * @param id 供应商主键
     * @return 结果
     */
    @Override
    public int deleteFirmSupplierById(Long id)
    {
        return firmSupplierMapper.deleteFirmSupplierById(id);
    }
}
